﻿namespace Creventive.Wpf.ShellFactory.Services
{
    /// <summary>
    /// Represents a factory creating a specific service.
    /// </summary>
    public interface IServiceFactory
    {
        /// <summary>
        /// Creates the specified service using the specified service container.
        /// </summary>
        /// <param name="serviceContainer">The service container.</param>
        /// <returns></returns>
        object Create(IServiceContainer serviceContainer);
    }

    /// <summary>
    /// Represents a factory creating a specific service.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IServiceFactory<out T> : IServiceFactory
        where T : class
    {
        /// <summary>
        /// Creates the specified service using the specified service container.
        /// </summary>
        /// <param name="serviceContainer">The service container.</param>
        /// <returns></returns>
        new T Create(IServiceContainer serviceContainer);
    }
}